<?php
	require_once('../classes/DatabaseClass.php');
	require_once('../classes/XSSClass.php');
	require_once('ForumClass.php');
	require_once('UsersClass.php');
	require_once('../services/config.php');
	
	$forum = new ForumClass;
	$users = new UsersClass;
	
	//print_r($users->register('bobco3', 'lolita', 'lolita' ));
	//print_r($users->login('bobco3', 'lolita'));
	print_r($users->isLogged('d92fdab4ef9356541355bf58782fd0a5'));
	//print_r($users->logout('8ea835a6f604bbd368ea1d6f67a51080'));
	//print_r($forum->newTopic('d92fdab4ef9356541355bf58782fd0a5', 'Uz mam dost'));
	//print_r($forum->postMessage('d92fdab4ef9356541355bf58782fd0a5', 'Toto je testovacia sprava', 'Telo spravy. Nic nehovoriaca blbost :)', '6905e6617b449f5df7825454d886f47c'));
	//topicId: 6905e6617b449f5df7825454d886f47c
	//sessionId: d92fdab4ef9356541355bf58782fd0a5
	//messageId: ec2afb0812caa28406634457356d67ab
	//print_r($forum->subscribe('d92fdab4ef9356541355bf58782fd0a5', '6905e6617b449f5df7825454d886f47c'));
	//print_r($forum->unsubscribe('d92fdab4ef9356541355bf58782fd0a5', '6905e6617b449f5df7825454d886f47c'));
	//print_r($forum->readByUser('d92fdab4ef9356541355bf58782fd0a5', 'ec2afb0812caa28406634457356d67ab'));
	//print_r($forum->getTopics('d92fdab4ef9356541355bf58782fd0a5'));
	print_r($forum->getTopicMessages('d92fdab4ef9356541355bf58782fd0a5', '6905e6617b449f5df7825454d886f47c'));
?>